﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.master" AutoEventWireup="true" CodeFile="MyProfile.aspx.cs" Inherits="MyProfile" %>
<asp:Content ID="cntMain" ContentPlaceHolderID="cphZone1" Runat="Server">
<asp:ValidationSummary runat="server" id="vsumMyProfile" HeaderText="&lt;b&gt;&amp;nbsp;There were some problems with your entries:&lt;/b&gt;" />
<asp:Panel runat="server" ID="pnlMyProfile" DefaultButton="btnSave">
<p class="sectionTitle">My Profile</p>
<table border="0" width="494px">
    <tbody>
        <tr>
            <td class="label">
                User name:</td>
            <td>
                <asp:Label ID="lblUserName" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="label">
                Password:</td>
            <td valign="middle">********&nbsp;<asp:Button runat="server" ID="btnChange" 
                    Text="Change" onclick="btnChange_Click" CausesValidation="false" />
            </td>
        </tr>
        <tr>
            <td class="label">
                *Company:
            </td>
            <td>
                <asp:TextBox runat="server" ID="txtCompany" Width="150px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvCompany" runat="server" ControlToValidate="txtCompany"
                    Display="Dynamic" ErrorMessage="Company name is required." ToolTip="Company name is required.">&nbsp;</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="label">
                *Tax id:
            </td>
            <td>
                <asp:TextBox runat="server" ID="txtTaxId" Width="150px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvTaxId" runat="server" ControlToValidate="txtTaxId"
                    Display="Dynamic" ErrorMessage="Tax id is required." ToolTip="Tax id is required.">&nbsp;</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="label">
                *First name:
            </td>
            <td>
                <asp:TextBox runat="server" ID="txtFirstName" Width="150px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvFirstName" runat="server" ControlToValidate="txtFirstName"
                    Display="Dynamic" ErrorMessage="First name is required." ToolTip="First name is required.">&nbsp;</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="label">
                *Last name:
            </td>
            <td>
                <asp:TextBox runat="server" ID="txtLastName" Width="150px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvLastName" runat="server" ControlToValidate="txtLastName"
                    Display="Dynamic" ErrorMessage="Last name is required." ToolTip="Last name is required.">&nbsp;</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="label">
                *Street address:
            </td>
            <td>
                <asp:TextBox runat="server" ID="txtAddress" Width="150px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvAddress" runat="server" ControlToValidate="txtAddress"
                    Display="Dynamic" ErrorMessage="Street address is required." ToolTip="Street address is required.">&nbsp;</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="label">
                *City:
            </td>
            <td>
                <asp:TextBox runat="server" ID="txtCity" Width="150px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvCity" runat="server" ControlToValidate="txtCity"
                    Display="Dynamic" ErrorMessage="City is required." ToolTip="City is required.">&nbsp;</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="label">
                *State:
            </td>
            <td>
                <asp:DropDownList runat="server" Width="150px" ID="lstState"><asp:ListItem>State</asp:ListItem>
<asp:ListItem Value="AL">Alabama</asp:ListItem>
<asp:ListItem Value="AK">Alaska</asp:ListItem>
<asp:ListItem Value="AZ">Arizona</asp:ListItem>
<asp:ListItem Value="AR">Arkansas</asp:ListItem>
<asp:ListItem Value="CA">California</asp:ListItem>
<asp:ListItem Value="CO">Colorado</asp:ListItem>
<asp:ListItem Value="CT">Connecticut</asp:ListItem>
<asp:ListItem Value="DC">District of Columbia</asp:ListItem>
<asp:ListItem Value="DE">Delaware</asp:ListItem>
<asp:ListItem Value="FL">Florida</asp:ListItem>
<asp:ListItem Value="GA">Georgia</asp:ListItem>
<asp:ListItem Value="HI">Hawaii</asp:ListItem>
<asp:ListItem Value="ID">Idaho</asp:ListItem>
<asp:ListItem Value="IL">Illinois</asp:ListItem>
<asp:ListItem Value="IN">Indiana</asp:ListItem>
<asp:ListItem Value="IA">Iowa</asp:ListItem>
<asp:ListItem Value="KS">Kansas</asp:ListItem>
<asp:ListItem Value="KY">Kentucky</asp:ListItem>
<asp:ListItem Value="LA">Louisiana</asp:ListItem>
<asp:ListItem Value="ME">Maine</asp:ListItem>
<asp:ListItem Value="MD">Maryland</asp:ListItem>
<asp:ListItem Value="MA">Massachusetts</asp:ListItem>
<asp:ListItem Value="MI">Michigan</asp:ListItem>
<asp:ListItem Value="MN">Minnesota</asp:ListItem>
<asp:ListItem Value="MS">Mississippi</asp:ListItem>
<asp:ListItem Value="MO">Missouri</asp:ListItem>
<asp:ListItem Value="MT">Montana</asp:ListItem>
<asp:ListItem Value="NE">Nebraska</asp:ListItem>
<asp:ListItem Value="NV">Nevada</asp:ListItem>
<asp:ListItem Value="NH">New Hampshire</asp:ListItem>
<asp:ListItem Value="NJ">New Jersey</asp:ListItem>
<asp:ListItem Value="NM">New Mexico</asp:ListItem>
<asp:ListItem Value="NY">New York</asp:ListItem>
<asp:ListItem Value="NC">North Carolina</asp:ListItem>
<asp:ListItem Value="ND">North Dakota</asp:ListItem>
<asp:ListItem Value="OH">Ohio</asp:ListItem>
<asp:ListItem Value="OK">Oklahoma</asp:ListItem>
<asp:ListItem Value="OR">Oregon</asp:ListItem>
<asp:ListItem Value="PA">Pennsylvania</asp:ListItem>
<asp:ListItem Value="RI">Rhode Island</asp:ListItem>
<asp:ListItem Value="SC">South Carolina</asp:ListItem>
<asp:ListItem Value="SD">South Dakota</asp:ListItem>
<asp:ListItem Value="TN">Tennessee</asp:ListItem>
<asp:ListItem Value="TX">Texas</asp:ListItem>
<asp:ListItem Value="UT">Utah</asp:ListItem>
<asp:ListItem Value="VT">Vermont</asp:ListItem>
<asp:ListItem Value="VA">Virginia</asp:ListItem>
<asp:ListItem Value="WA">Washington</asp:ListItem>
<asp:ListItem Value="WV">West Virginia</asp:ListItem>
<asp:ListItem Value="WI">Wisconsin</asp:ListItem>
<asp:ListItem Value="WY">Wyoming</asp:ListItem>
</asp:DropDownList><asp:RequiredFieldValidator ID="rfvState" runat="server" ControlToValidate="lstState"
                    Display="Dynamic" ErrorMessage="State is required." ToolTip="State is required.">&nbsp;</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="label">
                *Zip:
            </td>
            <td>
                <asp:TextBox runat="server" ID="txtZip" Width="100px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvZip" runat="server" ControlToValidate="txtZip"
                    Display="Dynamic" ErrorMessage="Zip code is required." ToolTip="Zip code is required.">&nbsp;</asp:RequiredFieldValidator><asp:RegularExpressionValidator ID="revZip" runat="server" ControlToValidate="txtZip"
                                Display="Dynamic" ErrorMessage="Invalid zip code." ToolTip="Invalid zip code." ValidationExpression="\d{5}(-\d{4})?">&nbsp;</asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td class="label">
                *E-mail:
            </td>
            <td>
                <asp:TextBox ID="txtEmail" runat="server" Width="175px" MaxLength="256"></asp:TextBox>
                <asp:RequiredFieldValidator
                        ID="rfvEmail" runat="server" ControlToValidate="txtEmail" Display="Dynamic"
                        ErrorMessge="Email address is required." ToolTip="Email address is required.">&nbsp;</asp:RequiredFieldValidator><asp:RegularExpressionValidator
                    ID="revEmail" runat="server" ControlToValidate="txtEmail" ErrorMessage="Invalid email address."
                    ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" 
                    Display="Dynamic" ToolTip="Invalid email address.">&nbsp;</asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td class="label">
                *Daytime phone:
            </td>
            <td>
                <asp:TextBox runat="server" ID="txtPhoneNumber" Width="100px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvPhoneNumber" runat="server" ControlToValidate="txtPhoneNumber"
                                Display="Dynamic" ErrorMessage="Phone number is required." ToolTip="Phone number is required.">&nbsp;</asp:RequiredFieldValidator>
                            <asp:RegularExpressionValidator ID="revPhoneNumber" runat="server" ControlToValidate="txtPhoneNumber"
                                Display="Dynamic" ErrorMessage="Invalid phone number." ToolTip="Invalid phone number." ValidationExpression="((\(\d{3}\) ?)|(\d{3}-))?\d{3}-\d{4}">&nbsp;</asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td></td>
            <td></td>
        </tr>
        <tr>
            <td colspan="2"><asp:Button runat="server" ID="btnSave" Text="Save Profile" 
        onclick="btnSave_Click" />&nbsp;<asp:Button runat="server" ID="btnCancel" CausesValidation="false" Text="Cancel" onclick="btnCancel_Click" /></td>
        </tr>
    </tbody>
</table>      
</asp:Panel>
<asp:Panel runat="server" ID="pnlConfirmation">
    <p class="sectionTitle">
                Profile Updated</p>
            <table>
                <tr>
                    <td>
                        Your profile has been successfully saved.
                    </td>
                </tr>
                </table>
</asp:Panel>
</asp:Content>